Storage devices using semiconductor elements are broadly classified into two categories: a volatile storage device that loses stored data when power supply stops, and a nonvolatile storage device that holds stored data even when power is not supplied.
Examples of a volatile storage device include a dynamic random access memory (hereinafter referred to as a DRAM) and a static random access memory (hereinafter referred to as an SRAM).
When a DRAM is formed using a conventional transistor, a data retention period is short because leakage current is generated between a source and a drain even when a transistor is off. For that reason, another writing operation (a refresh operation) is necessary at predetermined intervals, and this increases power consumption. In addition, when power supply stops, the above refresh operation cannot be performed; thus, data is lost.
On the other hand, although an SRAM retains stored data with the use of a circuit such as a flip-flop circuit and thus does not need refresh operation, unit price of the storage capacity is expensive. Note that when power supply stops, stored data is lost as in the case of the DRAM.
Typical examples of a nonvolatile storage device include a flash memory. A flash memory includes a floating gate between a gate electrode and a channel formation region in a transistor and retains data by injecting and retaining charge in the floating gate. Therefore, in a flash memory, the data retention period is long semi-permanently and refresh operation is not needed (e.g., Patent Document 1).
However, an insulating layer between the channel formation region and the floating gate deteriorates by tunneling current generated at the time of writing; therefore, there is a limitation on the number of writing operations. Therefore, for example, a method in which the number of writing operations into each storage element is equalized is employed by providing a complicated peripheral circuit. However, even when the method for equalizing the number of writing operations is employed, the fundamental problem of lifetime is not solved; therefore, it can be said that a flash memory is not suitable for usage where data is rewritten frequently.
Moreover, high voltages are needed to inject charge into the floating gate and removing charge from the floating gate; therefore, it is necessary to provide a step-up circuit or the like. Further, it takes a relatively long time to inject charge into the floating gate and remove charge from the floating gate; thus, it is difficult to perform a data writing operation and a data erasing operation at high speed.